#include "StdAfx.h"
#include "ClientMessage.h"


ClientMessage::ClientMessage(void)
{
}


ClientMessage::~ClientMessage(void)
{
}


bool ClientMessage::CreateUserLogin( const std::string& user_name )
{
	CreateMsgPacket();
	CreateMessage("","",LOGIN);
	CreateBody(user_name);
	return true;
}

bool ClientMessage::CreateChat( const std::string& from_user_id,const std::string& to_user_id,const std::string& data )
{
	CreateMsgPacket();
	CreateMessage(from_user_id,to_user_id,CHAT);
	CreateBody(data);
	return true;
}

bool ClientMessage::CreateGroupChat( const std::string& from_user_id,const std::string& to_user_id,const std::string& data )
{
	CreateMsgPacket();
	CreateMessage(from_user_id,to_user_id,GROUPCHAT);
	CreateBody(data);
	return true;
}

//TODO(lqjunf@gmail.com):
bool ClientMessage::CreateShake( const std::string& from_user_id,const std::string& to_user_id )
{
	CreateMsgPacket();
	CreateMessage(from_user_id,to_user_id,SHAKE);
	return true;
}
